{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1525
  Verdict: Accepted
}
var a,i,m,c,k:longint;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
readln(a);
read(c);
m:=1;
for i:=2 to a do begin
    read(k);
    if k>=c then begin
       c:=k;
       m:=i;
    end;
end;
writeln(m);
end.